Registering and using topic
Registering and using
Before the EasyDialogManager can be used, it must be registered using IEasyDialogManagerRegistry, which is a simple register/unregister class. An example of this can be observed there
Now you are able to use registered Manager
via FlutterEasyDialogs.provider
:
// Show
FlutterEasyDialogs.provider.use<MyDialogManager>().show(
params: const EasyDialogManagerShowParams(
content: Text('My custom manager'),
),
);
// Hide
FlutterEasyDialogs.provider.use<MyDialogManager>().hide();
The specified use method provides access to the instance of a registered Manager
. You don't need to worry about instances and other details, as all registrations and initializations are done lazily.
Classes
- IEasyDialogManagerProvider Registering and using
- An interface for providing access to EasyDialogManager instances.
- IEasyDialogManagerProvider Registering and using
- An interface for providing access to EasyDialogManager instances.
- IEasyDialogManagerRegistry Registering and using
- Class that is responsible for registering EasyDialogManager.
- IEasyDialogManagerRegistry Registering and using
- Class that is responsible for registering EasyDialogManager.